/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package testcode;

import java.util.Date;
import java.util.Calendar;
import java.text.SimpleDateFormat;
/**
 *
 * @author Vitamin
 */
public class test {

public static void main(String args[])
{
//Date nowTime=new Date();
//SimpleDateFormat matter1=new SimpleDateFormat("yyyy-MM-dd");
//String tep=matter1.format(nowTime);
//System.out.println("现在的时间:"+tep);

//String today=matter1.format(new Date(System.currentTimeMillis()+232323323)); //Notice that it's MillionSecond not Second!!
//System.out.println("Today is "+today);

//        Date today=new Date();
//        SimpleDateFormat kiper=new SimpleDateFormat("yyyy-MM-dd");
//        String tp=kiper.format(today);
//        System.out.println("Today is "+tp);



try
{
Calendar gg=Calendar.getInstance();
Date date=new SimpleDateFormat("yyyy-MM-dd").parse("2009-2-19");

gg.setTime(date);
gg.add(Calendar.YEAR, 1);
Date dta=gg.getTime();
SimpleDateFormat kiper=new SimpleDateFormat("yy");
String tp=kiper.format(date);
System.out.println("Today is "+ tp);

}catch(Exception e)
{
    e.printStackTrace();
}


}

}




